package com.rohoo.framework.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.rohoo.framework.util.ResultSetUtil;

public class DAORowMapper implements RowMapper{
	
	private Class target;
	
	public void setTarget(Class target){
		this.target = target;
	}
	
	public Class getTarget(){
		return target;
	}
	
	public DAORowMapper(Class target){
		this.target = target;
	}
	
	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		return ResultSetUtil.getElement(target ,rs);
	}

}
